import axios from 'wx-axios'

const instance = axios.create({
	baseURL: 'http://127.0.0.1:3000',
	timeout: 10000
})

instance.interceptors.request.use(
	config => {
		return config
	},
	err => {
		return Promise.reject(err)
	})

instance.interceptors.response.use(
	req => {
		return req.data
	}, err => {
		return Promise.reject(err)
	})

export default instance